import About from '../page/About/About'
import Home from '../page/Home/Home'
import Index from '../page/Index/Index'
import Message from '../page/Message/Message'
import News from '../page/News/News'
import NotFound from '../page/Not Found/NotFound'
import { Navigate } from 'react-router-dom'
export default [
    {
        path: '/home',
        element: <Home />,
        caseSensitive: true,
        //配置二级路由
        children: [
            {
                path: '/home/news',
                element: <News />
            },
            {
                path: '/home/message',
                element: <Message />
            },
            {
                index: true,
                element: <Navigate to='/home/news' />
            }
        ]
    },
    {
        path: '/about',
        element: <About />,
        caseSensitive: true,
        //配置二级路由
        children: [
            {
                path: '/about/news',
                element: <News />
            },
            {
                path: '/about/message',
                element: <Message />
            },
            {
                index: true,
                element: <Navigate to='/about/message' />
            }
        ]
    },
    {
        path: '*',
        element: <NotFound />
    },
    {
        path: '/',
        element: <Index />
    }
]